# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=breeze-icons5
pkgver=5.113.0
pkgrel=0
pkgdesc="Breeze icon themes"
arch="noarch !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-3.0-or-later"
makedepends="
	extra-cmake-modules
	py3-lxml
	python3
	qt5-qtbase-dev
	samurai
	"
checkdepends="bash"
subpackages="$pkgname-dev"
_repo_url="https://invent.kde.org/frameworks/breeze-icons.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/breeze-icons-$pkgver.tar.xz"
builddir="$srcdir/breeze-icons-$pkgver"

replaces="breeze-icons<=5.110.0-r0"

# Several KDE applications use icons not yet present in most themes
# We want to keep the possibility for users to not use the KDE provided
# breeze-icons theme however, as hopefully in the future this situation changes
# Thus let any theme that provides these icons provide "kde-icons" so the user
# retains their ability to choose their preferred theme
provides="kde-icons"
provider_priority=100

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBINARY_ICONS_RESOURCE=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure -E '(dupe|symlink)'
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
deb5f824fc9613a9e46fd2bfc048901c7b34ae364e566f406fc1316a01a1942385845f6127827032a5785b30d2e3c6e37b8185f891911401629dd27dcb8b15d5  breeze-icons-5.113.0.tar.xz
"
